package cn.rengy.web.framework.sys.userlogin;

import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import cn.rengy.lang.ResultEntity;


@Controller
@RequestMapping(value = "/authenticated/userLogin")
public class UserLoginController {
	private static Logger logger = LoggerFactory.getLogger(UserLoginController.class);
	@Autowired
	private UserLoginService userLoginService;
	
	@RequestMapping(value="/save")
	@ResponseBody
    public ResultEntity<?> save(@RequestBody Map<String,Object> paramMap){
		userLoginService.save(paramMap);
		return ResultEntity.ok();
    }
	
	@RequestMapping(value="/delete")
	@ResponseBody
    public ResultEntity<?> delete(@RequestBody Map<String,Object> paramMap){
		userLoginService.delete(paramMap);
		return ResultEntity.ok();
    }
	
	
	@RequestMapping(value="/enable")
	@ResponseBody
    public ResultEntity<?> enable(@RequestBody Map<String,Object> paramMap){
		userLoginService.enable(paramMap);
		return ResultEntity.ok();
    }
	
	@RequestMapping(value="/disable")
	@ResponseBody
    public ResultEntity<?> disable(@RequestBody Map<String,Object> paramMap){
		userLoginService.disable(paramMap);
		return ResultEntity.ok();
    }
	
	
}
